﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorldBankBBS.Common;

namespace WorldBankBBS.Translators
{
    public static class TranslatorFactory
    {
        public static ITranslator GetTranslator(this string encoding, ISession session)
        {
            switch (encoding.ToUpper())
            {
                case "PETSCII": return new CbmTranslator() { CurrentSession = session};
                case "ANSI": return new AnsiTranslator() { CurrentSession = session };
            }

            return new AsciiTranslator() { CurrentSession = session };
        }
    }
}
